/** TODO: This module needs a better name */

/** Metadata */
var METADATA = [
	/* Shared */
	{key:'name', value:'Name'},
	
	/* Teams */
	{key:'wins', value:'Wins'},
	{key:'losses', value:'Losses'},
	{key:'retired', value:'Retired Numbers'},
	{key:'nickname', value:'Nick Names'},
	{key:'colors', value:'Colors'},
	{key:'owner', value:'Owner'},
	{key:'city', value:'City'},
	{key:'state', value:'State'},
	{key:'stadium', value:'Stadium'},
	{key:'founded', value:'Founded'},
	{key:'joined', value:'Joined'},
	{key:'division', value:'Division'},
	{key:'league', value:'League'},
	{key:'championships', value:'Championships'},
	{key:'manager', value:'Manager'},
	
	/* Players */
	{key:'pos', value:'POS'},
	{key:'team', value:'Team'},
	{key:'g', value:'G'},
	{key:'ab', value:'AB'},
	{key:'r', value:'R'},
	{key:'h', value:'H'},
	{key:'2b', value:'2B'},
	{key:'3b', value:'3B'},
	{key:'hr', value:'HR'},
	{key:'rbi', value:'RBI'},
	{key:'bb', value:'BB'},
	{key:'k', value:'K'},
	{key:'sb', value:'SB'},
	{key:'cs', value:'CS'},
	{key:'avg', value:'AVG'},
	{key:'slg', value:'SLG'},
	{key:'obp', value:'OBP'},
	{key:'ops', value:'OPS'}
];


var SimpleOperations = [
	{key:'EQUAL', value:'equals', op:function(a,b) { return a === b; }},
	{key:'GT', value:'greaterThan', op:function(a,b) { return a > b}},
	{key:'LT', value:'lessThan', op:function(a,b) { return a < b}},
	{key:'CONTAINS', value:'contains',
		op:function(a,b) {
			a = a+''; b = b+'';
			return a.indexOf(b) > -1;
		}}
]